package com.midian.common.exception;

/**
 * 
 * @Title:异常  
 * @Desription:所有业务异常的父类 
 * @Company:MDKG
 * @ClassName:BizException.java
 * @Author:zhucong
 * @CreateDate:2013-6-7 下午5:52:47  
 * @UpdateUser:zhucong 
 * @Version:0.1
 */
@SuppressWarnings("serial")
public class BizException extends Exception {
	/**异常类型 */
	private Type type;
	public enum Type{
		SYSTEM,SERVICE
	}

	public Type getType() {
		return type;
	}
	public BizException(String message){
		this(message,Type.SERVICE);
	}
	public BizException(String message,Type type) {
		super(message);
		this.type = type;
	}

	public BizException(String message, Throwable target) {
		super(message, target);
		this.type = Type.SERVICE;
	}
}
